Skip to content

detect straight lines more readily#27

Open
hughperkins wants to merge 3 commits intodmgerman:masterfrom
hughperkins:easier-autolines2
Open

detect straight lines more readily#27
hughperkins wants to merge 3 commits intodmgerman:masterfrom
hughperkins:easier-autolines2

Conversation

@hughperkins
Copy link
Copy Markdown

For discussion purposes:

  • detects straight lines more readily, since can directly assume the whole set of points is one line, and then just check whether this assumption seems valid or not

@dmgerman
Copy link
Copy Markdown
Owner

Thanks Hugh for the patch. Can you describe a little bit in detail what the patch does?

thanks!
--dmg

@hughperkins
Copy link
Copy Markdown
Author

hughperkins commented May 15, 2016

Conceptually:

  • assumes that first and last points are the ends of a line
  • checks that the points in between are consistent with this hypothesis
  • if so, then replaces the wiggly multi-point line with this line

Concretely:

  • checks that no point is further from the line than 1/10 the length of the line
  • checks that the distance of each point from the start point increases monotonically

@hughperkins
Copy link
Copy Markdown
Author

(By the way, note that I have 1920x1280 laptop monitor. This is relatively high resolution, for a 14inch display, so it is possible that my mouse is more sensitive than if one was using a similar resolution on a larger display, or a lower resolution display. So, it is possible that the original algorithm works too, but needs to have some customizable sensitivity adjustment perhaps)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants